/**
 * 
 */
package com.shine.cotrun.exp;

/**
 * @author zsy
 *
 */
public class ExportFactory {
	/**
	 * 
	 * @param <D>
	 * @param type
	 * @param conf
	 * @return
	 */
	public static<D> Export<D> createInstance(String type, ExportConf conf) {
		Export<D> exp = null;
		if ("txt".equals(type)) {
			exp = new ExportToText<D>(conf);
		} else if ("xls".equals(type)) {
			exp = new ExportToExcel<D>(conf);
		} else if ("dbf".equals(type)) {
			exp = new ExportToDBF<D>(conf);
		}
		return exp;
	}
}
